package cn.net.shuxing.yifu.common.service;

import cn.net.shuxing.yifu.common.bean.UserRelationship;
import cn.net.shuxing.yifu.common.mapper.UserRelationshipMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserRelationshipService {


    @Autowired
    private UserRelationshipMapper userRelationshipMapper;


    /**
     * 查询
     * @param type
     * @param userId1
     * @return
     */
    public List<UserRelationship> selectList(Integer type,Long userId1){
        return userRelationshipMapper.selectList(type,userId1);
    }

    /**
     * 查询
     * @param type
     * @param userIdStr
     * @return
     */
    public List<UserRelationship> selectListByUserIdStr(Integer type,String userIdStr){
        return userRelationshipMapper.selectListByUserIdStr(type,userIdStr);
    }


    /**
     * 分页查询
     * @param type
     * @param userId1
     * @return
     */
    public List<UserRelationship> selectPageList(Integer startPageOn,Integer pageSize,Integer type,Long userId1){
        return userRelationshipMapper.selectPageList(startPageOn,pageSize,type,userId1);
    }

    /**
     * 新增
     * @param userRelationship
     * @return
     */
    public Integer add(UserRelationship userRelationship){
        return userRelationshipMapper.insertSelective(userRelationship);
    }


}
